home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 118 / MacAddict 118 2006-06.toast / Software / Graphics & Multimedia / Kinemac 1.1.0 (demo).dmg / Kinemac_Tiger.app / Contents / Library / Spotlight / SBGLPath.h < prev    next >
Text File  |  2006-02-28  |  2KB  |  76 lines

  1. #import <Cocoa/Cocoa.h>
  2. #import <OpenGL/OpenGL.h>
  3. #import <OpenGL/gl.h>
  4. #import <OpenGL/glu.h>
  5. #import <OpenGL/glext.h>
  6. #import <GLUT/glut.h>
  7. #import "SBGLObject.h"
  8. #import "Quaternions.h"
  9.  
  10. extern GLfloat                    gSelectionColor[4];
  11.  
  12. //typedef    GLfloat    VECTOR3D[3];
  13.  
  14. enum {
  15.     kPointPo = 0,
  16.     kPointC1 = 1,
  17.     kPointC2 = 2
  18. };
  19.  
  20. //////////////////////////////////////////////
  21. @interface SBGLPath : SBGLObject
  22. {
  23.     SB3DBezierPath    *gPath;
  24.     int                gSelectedPointIndex;
  25.     SB3DBezierPoint    *selectedPoint, *brotherPoint;
  26.     BOOL            gPenPathInDrawing, gAddingPoint;
  27.     BOOL            gHasBrother;
  28.     int                gSelectedPointKind;
  29.     BOOL            gLastClickHasSelected;
  30.     BOOL            gHaDraggato;
  31.     GLfloat            gSizeMinX, gSizeMinY, gSizeMinZ, gSizeMaxX, gSizeMaxY, gSizeMaxZ;
  32.     
  33.     GLfloat            vPoint[3], linkPoint[3];
  34.     SB3DPoint        pS, c1, c2, pE;
  35.     int                gTotPointsTimeCode;
  36.     GLfloat            **gTimeCode;
  37.     GLfloat            **gTangentCode;
  38. }
  39. - (NSMutableArray*)GetPathArray;
  40. - (void)SetPathArray:(NSMutableArray*)pathArray;
  41.  
  42. - (BOOL)mouseDown:(NSEvent*)theEvent;
  43. - (BOOL)mouseDragged:(NSEvent*)theEvent;
  44. - (void)mouseUp:(NSEvent*)theEvent;
  45.  
  46. - (void)ManagePointHorto:(NSPoint)curPoint distanzaC1:(float)distanzaC1 distanzaC2:(float)distanzaC2;
  47. - (void)ManagePointPerspective:(float)dx dy:(float)dy flags:(unsigned int)flags 
  48.         distanzaC1:(float)distanzaC1 distanzaC2:(float)distanzaC2
  49.         vectorCoeffMC1:(float*)vectorCoeffMC1 vectorCoeffMC2:(float*)vectorCoeffMC2;
  50. - (void)EnableInspectorSliders;
  51. - (void)UpdateInspector;
  52. - (void)SetSelectedPoint:(int)selectedPoint andKind:(int)kind;
  53. - (int)gSelectedPointIndex;
  54.  
  55. - (void)AddPoint:(NSPoint)mouseLoc;
  56. - (void)ReallocPointsInPath:(int)totPoints;
  57. - (void)DeleteSelectedPoint;
  58.  
  59. - (BOOL)SelectPointAt:(NSPoint)mouseLoc;
  60. - (void)GetTimeCode;
  61. - (void)InitTimeCode;
  62. - (void)ReleaseTimeCode;
  63. - (void)UpdateTimeCodeLength;
  64. - (void)GetTimeCodeForPath;
  65. - (void)CalculateMinMaxSize;
  66.  
  67. - (void)ProjectPoint:(GLfloat*)srcPoint ToScreenCoordinates:(GLfloat*)dstPoint;
  68. - (int)UnprojectPoint:(GLfloat*)srcPoint ToWorldCoordinates:(GLfloat*)dstPoint;
  69.  
  70. - (void)PlaceObjectWithSpriteCode:(float**)timeCode andTime:(int)t;
  71. - (void)GetCurvePointAtTime:(GLfloat)t;
  72. - (void)GetTangentAtTime:(GLfloat)t;
  73.  
  74. - (void)GetLinkedPoint:(GLfloat*)linkedPoint atGlobalTime:(int)globalTime;
  75. - (void)GetTangentPoint:(GLfloat*)tangentPoint;
  76. @end